
 
    <form class="checkoutform" action="{:U('insert')}" method="post">
      
      
      
      
      
  
<div class="form-group">
      <label class="control-label">标题</label>
      <div>
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="标题">
      </div>
   </div>
      
<div class="form-group">
      <label class="control-label">分类</label>

      
      
      <div class="row">
          <div class="col-sm-8" id="categorylistbox">
          
          
          <select class="form-control" name="documentcategory_id">
    
    
    
    <volist name="cate_list" id="vo">
          
            <option <eq name="vo['id']" value="$info['documentcategory_id']">selected="selected"</eq> value="{$vo.id}">{:getdeepstr($vo['deep'])}{$vo.title}</option>
            
          </volist>
    
</select>
          
          
      </div>
          <div class="col-sm-4"><a href="##" title="新增文档分类" class="btn btn-success" rel="{:U('Documentcategory/add')}" width="300" id="categorylistboxaddbtn">新增分类</a></div>
      </div>
      
      
      
      
         

   </div>
      
      
  
       <div class="form-group dropzone" id="filebox">
      
      
   </div>

<iframe src="{:U('uploadfile')}" appendto="#filebox" class="uploadiframe" style="height:150px;" filename="file[]"></iframe>

   
   
   

    </form>
 <form action="{:U('Documentcategory/getcategory')}" id="categorylistboxform"></form>
  
 <script>


function deldoc(){
	$('#filebox .preview').addClass('binddel');
	$('#filebox .preview.binddel a').click(function(e) {
		
		if(!confirm('确定删除吗？')){
			return false;
		}
		
		$(this).removeClass('binddel');
		var obj = $(this);
        var file = $(this).parent().find('[name="file[]"]').val();
		
		$.get('{:U('delfile')}', {file:file}, function(data){
			if(data.status == 1){
			    obj.parent().remove();
			}else{
				obj.parent().remove();
				alert(data.info);
			}

		}, 'json');
    });
}
deldoc();

$('#filebox').bind('DOMNodeInserted', function(e) {
deldoc();
		
	});
 
    $('#categorylistbox').ajaxlist({autoload:false});
 </script>